package com.nd.android.u.ui.activity.message_chat;

import android.os.Bundle;

import com.common.StarAppCIConst;
import com.nd.android.u.business.db.dao.AbstractChatDao;
import com.nd.android.u.ui.R;
import com.nd.android.u.ui.StarAppChatConst.MessageType;
import com.nd.android.u.ui.activity.chat_config.DeleteHistoryDialog;
import com.nd.android.u.ui.beanStarApp.DisplayMessage_App;
import com.product.android.business.config.Configuration;
import com.product.android.commonInterface.BaseCommonStruct;
import com.product.android.commonInterface.CIConst;
import com.product.android.commonInterface.CommonInterfaceManager;

/**
 * 消息助手界面 <br>
 * Created 2014-7-23 下午2:19:54
 * 
 * @version
 * @author cb
 * @see
 */
public class ChatActivity_Assistant extends BaseChatMessageActivity {
	/** 删除历史记录对话框 */
	private DeleteHistoryDialog mDialog;

	@Override
	protected boolean getParam(Bundle bundle) {
		messageType = MessageType.ASSISTANT;
		name = getString(R.string.contact_assistant);
		return true;
	}

	@Override
	protected int getRightButtonRes() {
		return R.drawable.delete_title_bg;
	}

	@Override
	public void rightBtnHandle() {

		DisplayMessage_App message = new DisplayMessage_App();
		// 要把消息的appid置为明星APP的appid,否则删除消息后通知到messagelistfragment的消息类型无法识别
		message.appId = Configuration.STARAPPID;
		message.setTypeId(AbstractChatDao.CONDITION_ALL);
		BaseCommonStruct struct = new BaseCommonStruct();
		struct.obj1=mActivity;
		struct.obj2=message;
		struct.lPara=1;
		int model = CIConst.CHAT_MODELID;
		int id = StarAppCIConst.CHAT_NOTIFY_DELETE_SYSTEM_HISTORY_210007;
		CommonInterfaceManager.INSTANCE.CommonInterfaceID(model, id, struct);
	}
}
